> ## Documentation Index
> Fetch the complete documentation index at: https://sequence-0fb8d9e6-api_docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# useSocialLink

> Hook to manage social link modal state and configuration

## Import

```tsx theme={null}
import { useSocialLink } from '@0xsequence/connect'
```

## Usage

```tsx theme={null}
import { useSocialLink } from '@0xsequence/connect'

function App() {
  const { isSocialLinkOpen, waasConfigKey, setIsSocialLinkOpen } = useSocialLink()
  
  const handleOpenSocialLink = () => {
    setIsSocialLinkOpen(true)
  }
  
  const handleCloseSocialLink = () => {
    setIsSocialLinkOpen(false)
  }
  
  return (
    <div>
      <button onClick={handleOpenSocialLink}>
        Open Social Link
      </button>
      
      {isSocialLinkOpen && (
        <div>
          <p>Social Link modal is open</p>
          <p>WaaS Config Key: {waasConfigKey || 'Not available'}</p>
          <button onClick={handleCloseSocialLink}>
            Close Modal
          </button>
        </div>
      )}
    </div>
  )
}
```

## Return Type: `UseSocialLinkReturnType`

The hook returns an object with the following properties:

```tsx theme={null}
type UseSocialLinkReturnType = {
  isSocialLinkOpen: boolean
  waasConfigKey: string | null
  setIsSocialLinkOpen: (isOpen: boolean) => void
}
```

### Properties

#### isSocialLinkOpen

`boolean`

Indicates whether the social link modal is currently open (`true`) or closed (`false`).

#### waasConfigKey

`string | null`

The WaaS configuration key associated with the social link functionality, or `null` if not available.

#### setIsSocialLinkOpen

`(isOpen: boolean) => void`

Function to open or close the social link modal.

**Parameters:**

| Parameter | Type      | Description                                                   |
| --------- | --------- | ------------------------------------------------------------- |
| `isOpen`  | `boolean` | Whether the modal should be open (`true`) or closed (`false`) |
